package com.jnks.constant.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

/**
 * @author Ryo
 */

@AllArgsConstructor
public enum TargetCompanyEnum {

    /**
     * 活动状态类型枚举
     */
    TARGET(1, "目标"),
    COMPANY(2, "重点单位");

    @Getter
    @Setter
    private Integer code;
    @Getter
    @Setter
    private String message;

    public static TargetCompanyEnum getByCode(String code) {
        if (null == code) {
            return null;
        }

        for (TargetCompanyEnum flyTypeEnum : TargetCompanyEnum.values()) {
            if (flyTypeEnum.getCode().equals(code)) {
                return flyTypeEnum;
            }
        }

        return null;
    }


}
